<?php namespace Summer\Shop\Models;

use Model;

/**
 * Model
 */
class CommentModel extends Model
{
    use \Winter\Storm\Database\Traits\Validation;
    

    /**
     * @var string The database table used by the model.
     */
    public $table = 'summer_shop_comments';

    /**
     * @var array Validation rules
     */
    public $rules = [
    ];
    public $attachMany = [
        'album' => 'System\Models\File'
    ];
    public $belongsTo = [
        'target' => ['RainLab\User\Models\User', 'key' => 'user_id','otherKey'=>'id'],
        'product' => ['Summer\Shop\Models\ProductModel', 'key' => 'product_id','otherKey'=>'id'],
        'order' => ['Summer\Shop\Models\OrderModel', 'key' => 'order_id','otherKey'=>'id'],
    ];
}
